]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
systemActions: Flatten folded search terms
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 12 Sep 2020 16:27:45 +0000 (18:27 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 14 Sep 2020 21:10:58 +0000 (21:10 +0000)
GLib.str_tokenize_and_fold() returns an array rather than a string
(the "tokenize" bit), so flatten the folded search terms like we
do for keywords.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3169

js/misc/systemActions.js

index e3b910a589d6d920840d33393b460f271d3ee21f..4c2f3a29051bb206910fe5f88e0940c998bf78d5 100644 (file)
@@ -266,7 +266,8 @@ const SystemActions = GObject.registerClass({
 
     getMatchingActions(terms) {
         // terms is a list of strings
-        terms = terms.map(term => GLib.str_tokenize_and_fold(term, null)[0]);
+        terms = terms.map(
+            term => GLib.str_tokenize_and_fold(term, null)[0]).flat(2);
 
         let results = [];